{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo  $this->createWebUrl('type', array('name'=>'xm_housekeep_we7'));}">服务类别</a></li>
    {if in_array('3', $power)}
	<li><a href="{php echo  $this->createWebUrl('typeadd', array('name'=>'xm_housekeep_we7'));}">添加类别</a></li>
	{/if}
	<li><a href="{php echo  $this->createWebUrl('project', array('name'=>'xm_housekeep_we7'));}">类别项目</a></li>
	{if in_array('3', $power)}
	<li><a href="{php echo  $this->createWebUrl('projectadd', array('name'=>'xm_housekeep_we7'));}">添加项目</a></li>
	{/if}
</ul>

<div class="clearfix">    
    <div class="panel panel-default">
    	<div class="panel-heading">
            服务类别列表
        </div>
        <div class="table-responsive panel-body" style="overflow:visible;">
            <table class="table table-hover">
            	<thead>
                	<tr class="active">
                    	<td>类别名称</td>
                        <td>操作</td>
                    </tr>
                </thead>
                <tbody>
                	{loop $list $val}
                	<tr>
                    	<td>
                        	<p class="form-control-static">{$val[name]}</p>
                        </td>
                        <td style="overflow:visible;">
                        	<div class="btn-group btn-group-sm">
								{if in_array('3', $power)}
                                <a class="btn btn-default" href="{php echo $this->createWebUrl('projectadd',array('id'=>$val['id'],'name'=>'xm_housekeep'));}"><i class="fa fa-plus-square"></i> 添加项目</a>
								<a class="btn btn-default" href="{php echo $this->createWebUrl('typeadd',array('id'=>$val['id'],'name'=>'xm_housekeep'));}"><i class="fa fa-edit"></i> 编辑</a>
                                <a class="btn btn-default" href="{php echo $this->createWebUrl('typedelete', array('id'=>$val['id'],'name'=>'xm_housekeep'));}" onClick="return confirm('删除该类别将同时删除该类型下相对应的服务项目.') && confirm('删除前已经确认了解删除后果?');"><i class="fa fa-remove"></i> 删除</a>
								{/if}
								<a class="btn btn-default" href="{php echo $this->createWebUrl('project', array('id'=>$val['id'],'name'=>'xm_housekeep'));}"><i class="fa fa-external-link fa-fw"></i> 查看服务项目</a>
                            </div>
                        </td>
                    </tr>
                    {/loop}
                    
                </tbody>
            </table>
        </div>
        
        <div class="panel-body text-center">
            {$pager}
        </div>
        
        <div class="panel-footer">
			{if in_array('3', $power)}
            <a class="btn btn-default" href="{php echo $this->createWebUrl('typeadd',array('name'=>'xm_housekeep_we7'));}">新增类别</a>
			{/if}
        </div>
        
    </div>
</div>


{template 'common/footer'}